home *** CD-ROM | disk | FTP | other *** search
/ Chip 2007 January, February, March & April / Chip-Cover-CD-2007-02.iso / Pakiet bezpieczenstwa / mini Pentoo LiveCD 2006.1 / mpentoo-2006.1.iso / livecd.squashfs / usr / lib / mozilla-firefox / include / imglib2 / imgIDecoder.h < prev    next >
C/C++ Source or Header  |  2006-05-08  |  5KB  |  165 lines

  1. /*
  2.  * DO NOT EDIT.  THIS FILE IS GENERATED FROM imgIDecoder.idl
  3.  */
  4.  
  5. #ifndef __gen_imgIDecoder_h__
  6. #define __gen_imgIDecoder_h__
  7.  
  8.  
  9. #ifndef __gen_nsISupports_h__
  10. #include "nsISupports.h"
  11. #endif
  12.  
  13. /* For IDL files that don't want to include root IDL files. */
  14. #ifndef NS_NO_VTABLE
  15. #define NS_NO_VTABLE
  16. #endif
  17. class nsIInputStream; /* forward declaration */
  18.  
  19. class imgILoad; /* forward declaration */
  20.  
  21.  
  22. /* starting interface:    imgIDecoder */
  23. #define IMGIDECODER_IID_STR "9eebf43a-1dd1-11b2-953e-f1782f4cbad3"
  24.  
  25. #define IMGIDECODER_IID \
  26.   {0x9eebf43a, 0x1dd1, 0x11b2, \
  27.     { 0x95, 0x3e, 0xf1, 0x78, 0x2f, 0x4c, 0xba, 0xd3 }}
  28.  
  29. /**
  30.  * imgIDecoder interface
  31.  *
  32.  * @author Stuart Parmenter <pavlov@netscape.com>
  33.  * @version 0.2
  34.  * @see imagelib2
  35.  */
  36. class NS_NO_VTABLE imgIDecoder : public nsISupports {
  37.  public: 
  38.  
  39.   NS_DEFINE_STATIC_IID_ACCESSOR(IMGIDECODER_IID)
  40.  
  41.   /**
  42.    * Initalize an image decoder.
  43.    * @param aRequest the request that owns the decoder.
  44.    *
  45.    * @note The decode should QI \a aLoad to an imgIDecoderObserver
  46.    * and should send decoder notifications to the request.
  47.    * The decoder should always pass NULL as the first two parameters to
  48.    * all of the imgIDecoderObserver APIs.
  49.    */
  50.   /* void init (in imgILoad aLoad); */
  51.   NS_IMETHOD Init(imgILoad *aLoad) = 0;
  52.  
  53.   /** 
  54.    * Closes the stream. 
  55.    */
  56.   /* void close (); */
  57.   NS_IMETHOD Close(void) = 0;
  58.  
  59.   /**
  60.    * Flushes the stream.
  61.    */
  62.   /* void flush (); */
  63.   NS_IMETHOD Flush(void) = 0;
  64.  
  65.   /**
  66.    * Writes data into the stream from an input stream.
  67.    * Implementer's note: This method is defined by this interface in order
  68.    * to allow the output stream to efficiently copy the data from the input
  69.    * stream into its internal buffer (if any). If this method was provide
  70.    * as an external facility, a separate char* buffer would need to be used
  71.    * in order to call the output stream's other Write method.
  72.    * @param fromStream the stream from which the data is read
  73.    * @param count the maximun number of bytes to write
  74.    * @return aWriteCount out parameter to hold the number of
  75.    *         bytes written. if an error occurs, the writecount
  76.    *         is undefined
  77.    */
  78.   /* unsigned long writeFrom (in nsIInputStream inStr, in unsigned long count); */
  79.   NS_IMETHOD WriteFrom(nsIInputStream *inStr, PRUint32 count, PRUint32 *_retval) = 0;
  80.  
  81. };
  82.  
  83. /* Use this macro when declaring classes that implement this interface. */
  84. #define NS_DECL_IMGIDECODER \
  85.   NS_IMETHOD Init(imgILoad *aLoad); \
  86.   NS_IMETHOD Close(void); \
  87.   NS_IMETHOD Flush(void); \
  88.   NS_IMETHOD WriteFrom(nsIInputStream *inStr, PRUint32 count, PRUint32 *_retval); 
  89.  
  90. /* Use this macro to declare functions that forward the behavior of this interface to another object. */
  91. #define NS_FORWARD_IMGIDECODER(_to) \
  92.   NS_IMETHOD Init(imgILoad *aLoad) { return _to Init(aLoad); } \
  93.   NS_IMETHOD Close(void) { return _to Close(); } \
  94.   NS_IMETHOD Flush(void) { return _to Flush(); } \
  95.   NS_IMETHOD WriteFrom(nsIInputStream *inStr, PRUint32 count, PRUint32 *_retval) { return _to WriteFrom(inStr, count, _retval); } 
  96.  
  97. /* Use this macro to declare functions that forward the behavior of this interface to another object in a safe way. */
  98. #define NS_FORWARD_SAFE_IMGIDECODER(_to) \
  99.   NS_IMETHOD Init(imgILoad *aLoad) { return !_to ? NS_ERROR_NULL_POINTER : _to->Init(aLoad); } \
  100.   NS_IMETHOD Close(void) { return !_to ? NS_ERROR_NULL_POINTER : _to->Close(); } \
  101.   NS_IMETHOD Flush(void) { return !_to ? NS_ERROR_NULL_POINTER : _to->Flush(); } \
  102.   NS_IMETHOD WriteFrom(nsIInputStream *inStr, PRUint32 count, PRUint32 *_retval) { return !_to ? NS_ERROR_NULL_POINTER : _to->WriteFrom(inStr, count, _retval); } 
  103.  
  104. #if 0
  105. /* Use the code below as a template for the implementation class for this interface. */
  106.  
  107. /* Header file */
  108. class _MYCLASS_ : public imgIDecoder
  109. {
  110. public:
  111.   NS_DECL_ISUPPORTS
  112.   NS_DECL_IMGIDECODER
  113.  
  114.   _MYCLASS_();
  115.  
  116. private:
  117.   ~_MYCLASS_();
  118.  
  119. protected:
  120.   /* additional members */
  121. };
  122.  
  123. /* Implementation file */
  124. NS_IMPL_ISUPPORTS1(_MYCLASS_, imgIDecoder)
  125.  
  126. _MYCLASS_::_MYCLASS_()
  127. {
  128.   /* member initializers and constructor code */
  129. }
  130.  
  131. _MYCLASS_::~_MYCLASS_()
  132. {
  133.   /* destructor code */
  134. }
  135.  
  136. /* void init (in imgILoad aLoad); */
  137. NS_IMETHODIMP _MYCLASS_::Init(imgILoad *aLoad)
  138. {
  139.     return NS_ERROR_NOT_IMPLEMENTED;
  140. }
  141.  
  142. /* void close (); */
  143. NS_IMETHODIMP _MYCLASS_::Close()
  144. {
  145.     return NS_ERROR_NOT_IMPLEMENTED;
  146. }
  147.  
  148. /* void flush (); */
  149. NS_IMETHODIMP _MYCLASS_::Flush()
  150. {
  151.     return NS_ERROR_NOT_IMPLEMENTED;
  152. }
  153.  
  154. /* unsigned long writeFrom (in nsIInputStream inStr, in unsigned long count); */
  155. NS_IMETHODIMP _MYCLASS_::WriteFrom(nsIInputStream *inStr, PRUint32 count, PRUint32 *_retval)
  156. {
  157.     return NS_ERROR_NOT_IMPLEMENTED;
  158. }
  159.  
  160. /* End of implementation class template. */
  161. #endif
  162.  
  163.  
  164. #endif /* __gen_imgIDecoder_h__ */
  165.